namespace Excerise;

public class Book
{
    //属性
    public string Title { get; set; }
    public string Author { get; set; }
    public double Price { get; set; }

    //全参构造
    public Book(string title, string author, double price)
    {
        Title = title;
        Author = author;
        Price = price;
    }

    //用于显示图书的所有信息
    public string DisplayBookDetails()
    {
        return $"书名:{Title},作者:{Author},价格:{Price}";
    }
}